<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/LayoutPadrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="centro">
        <h:form>
            <p:panelGrid columns="2">
                <f:facet name="header">
                    Relatórios - Confirmações por Evento
                </f:facet>

                <h:outputLabel value="Evento"/>

                <p:selectOneMenu value="#{relatorioConfirmadosPorEventoBean.evento}" required="true">
                    <f:selectItems value="#{relatorioConfirmadosPorEventoBean.eventos}"
                                   var="evento"
                                   itemLabel="#{evento.descricao} - #{evento.data}"
                                   itemValue="#{evento}"/>
                </p:selectOneMenu>
                <f:facet name="footer">
                    <p:commandButton value="Gerar Relatório" action="#{relatorioConfirmadosPorEventoBean.gerar}"
                                     update="@all"
                                     ajax="false"
                                     onclick="this.form.target='_blank'"/>
                </f:facet>
            </p:panelGrid>
            <p:growl />
        </h:form>
    </ui:define>

</ui:composition>
